﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="UserList.aspx.cs" Inherits="Medianamik.UI.SecurityManagement.UserList" MasterPageFile="../MasterPages/MedianamikModule.Master" %>



<asp:Content ID="ContextMenuContent" ContentPlaceHolderID="ContextMenu" runat="server">
    <a href="<%= ManagementURL %>" class="Action BtAjoutPage"><asp:Localize runat="server" 
        Text="<%$ Resources: Medianamik_SecurityManagement, AddUser%>" /></a>
	<asp:HyperLink runat="server" ID="ReturnLink" CssClass="Action BtAnnuler-Inactif" 
	    Text="<%$ Resources: Medianamik_Global, Cancel %>" />
</asp:Content>

<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
    <asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <p><asp:DropDownList ID="Groups" 
                                  runat="server" 
                                  AllowCustomText="false" 
                                  AutoPostBack="true"
                                  OnSelectedIndexChanged="FilterByGroup"
                                  CssClass="SelectList" />
                <asp:PlaceHolder ID="FilterPlaceHolder" runat="server">
                    <asp:Literal runat="server" Text="Filtre:" />&nbsp;
                    <asp:TextBox ID="FilterBox" runat="server" CssClass="TxtBox" /> &nbsp; 
                    <asp:Button ID="RefreshButton" 
                                runat="server" 
                                CssClass="Btn" 
                                OnClick="FilterList" 
                                UseSubmitBehavior="false" 
                                Text="<%$ Resources : Medianamik_Global, Refresh %>" />
                </asp:PlaceHolder></p>
            <telerik:RadGrid runat="server" ID="UserGrid" EnableEmbeddedSkins="false" 
                Skin="Medianamik" AutoGenerateColumns="false" Width="100%" AllowPaging="false">
                <MasterTableView DataKeyNames="ID">
                <Columns>
		            <telerik:GridBoundColumn DataField="FullName" HeaderText="<%$ Resources: Medianamik_SecurityManagement, FullNameColumn %>" />
	                <telerik:GridTemplateColumn HeaderText="<%$ Resources: Medianamik_SecurityManagement, GroupsColumn %>">
	                    <ItemTemplate>
	                        <%# GetUserGroups((Guid)Eval("UserId")) %>
	                    </ItemTemplate>
	                </telerik:GridTemplateColumn>
	                <telerik:GridBoundColumn DataField="UserName" HeaderText="<%$ Resources: Medianamik_SecurityManagement, UserNameColumn %>" />
	                <telerik:gridboundcolumn datafield="lastlogindate" headertext="<%$ resources: medianamik_securitymanagement, lastlogindatecolumn %>" />
	                <telerik:gridboundcolumn datafield="subscriptiondate" headertext="<%$ resources: medianamik_securitymanagement, subscriptiondatecolumn %>" />
	            </Columns>
	            </MasterTableView>
            </telerik:RadGrid>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
